package com.example.template.service.query;

import com.example.template.utils.ApplicationContextHolder;
import com.example.template.utils.Query;

public class StudentQuery implements Query<String> {

    private final StudentQueryReceiver receiver;

    public StudentQuery() {
        this.receiver = ApplicationContextHolder.getApplicationContext()
                .getBean(StudentQueryReceiver.class);
    }

    @Override
    public String execute() {
        return receiver.action(this);
    }

}
